import React from 'react';
import { BrowserRouter, useRoutes } from "react-router-dom";
{{#if useRedux}}
import { Provider } from 'react-redux';
import store from '@/models';
{{/if}}
{{#if usePromiseRouter}}
import PageRoutes from '../useRoutes';
{{else}}
import routers from "@/routers";
// 不使用配置的文件，自己来定义路由
function PageRoutes() {
  return <></>
}
{{/if}}

function App() {
  return (
    {{#if useRedux}}
    <Provider store={store}>
    {{/if}}
      <BrowserRouter>
        <PageRoutes />
      </BrowserRouter>
    {{#if useRedux}}
    </Provider>
    {{/if}}
  );
}

export default App;
